package com.fub.positioning;

import android.content.Context;

public class PlaybackWifiProvider implements IWifiProvider {
	private WifiRecorder recorder;

	/**
	 * Constructs an new wifi-provider that plays measurements from recorder.
	 * 
	 * @param context
	 */
	public PlaybackWifiProvider(Context context) {
		this.recorder = WifiRecorder.getInstance(context);
	}

	/**
	 * Returns a recorded measurement from recorder.
	 */
	public Measurement measureAccessPointsSignalStrength() {
		if (this.recorder.hasNextMeasurement()) {
			Measurement measurement = this.recorder.getNextMeasuring();
			return measurement;
		}
		return null;
	}
}
